<?php
namespace Home\Model;
use Common\Model\SysModel;

class BaseModel extends SysModel{
	
	
	/**
	* 获取数据库全部的数据表
	* @return array 表名称数组
	*/
	public function listTables(){
	
		$rs		=	$this->query("SHOW TABLES FROM ".C('DB_NAME'));
		
		$tables	=	NULL;
		$num	=	count($rs);
		
		for($i=0; $i < $num; $i++){
			$tables[]		=	$rs[$i]['Tables_in_'.C('DB_NAME')];
		}
		
		return $tables;	
	}	
	

}


?>